#include "a2trdef.h"
/* ----- a2dbform - read/write data from windows to base ---------- */
#ifdef __cplusplus
extern "C" {
#endif
a2dbform(ACCESS *pbase, char move, char op, PCB *pcb, ACCESS **dblist);
/* return: 0 - O'K,
	  -1 - no required vertex in base (reading),
	  -2 - key window is empty (searching by key),
	  -3 - serious errors.
pbase   - pointer to db control table,
move    - moving in db,
op      - operation in db,
pcb     - part descriptor,
dblist  - pointer to array of pointers to db tables.
*/
a2dbwnd(ACCESS *pbase, char op, WCB *wcb, PCB *pcb, ACCESS **dblist);
/* return: 0 - O'K,
	  -1 - no required vertex in base (reading),
	  -2 - key window is empty (searching by key),
	  -3 - serious errors.
pbase   - pointer to db control table,
move    - moving in db,
op      - operation in db,
pcb     - part descriptor,
dblist  - pointer to array of pointers to db tables.
*/
a2dbtable(ACCESS *pb, int (*fltr)(), TINT *tsize, int flags,
		   void *answer, PCB *pcbp, PCB *pcbh, ACCESS **dblist);
/* return:   full code of pressed key,
	     0, if errors,
pb     - pointer to main db control table,
fltr   - filter function,
tsize  - table size,
flags  - flags (place data by columns or by lines,
		display help or not,
		parameter answer is pointer to WCB/PCB)
answer - descriptor of window (WCB) or part (PCB), where shell be
	 placed selected values. If WCB is used, then selected key
	 will be placed there. In case of PCB contents of windows
	 of part pcbp will be transferred to windows of part answer.
	 At that accordance between windows is set by names.
pcbp    - descriptor of part - element of table.
pcbh   - descriptor of part - header of table.
dblist - pointer to list of pointers to db tables.
*/
#ifdef __cplusplus
}
#endif
#define TAB_ROW    1  /* display information by lines (not by columns)*/
#define TAB_NOHELP 2  /* don't display HELP */
#define TAB_PCB    4  /* answer - pointer to PCB (not WCB)*/
#define TAB_UPD    8  /* correction is allowed */
#define TAB_NODIAL 16 /* display only, no dialog */
#define TAB_DLT    32 /* deletion is allowed */
#define TAB_CONT   64 /* continuation */
#define TAB_EXT   128 /* extant table */
#define TAB_AUTONUM  256 /* autonumerating */
#define TAB_INS      512 /* No insert while TAB_UPD */
			 /* Insert while no TAB_UPD */

